home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 5817 / 5817.xpi / chrome / content / sqlitemanager.xul < prev    next >
Extensible Markup Language  |  2010-02-11  |  37KB  |  640 lines

  1. <?xml version="1.0"?>
  2.  
  3. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
  4. <?xml-stylesheet href="chrome://sqlitemanager/skin/sqlitemanager.css" type="text/css"?>
  5. <?xml-stylesheet href="chrome://sqlitemanager/skin/dynaTreeDataTable.css" type="text/css"?>
  6.  
  7. <?xul-overlay href="chrome://sqlitemanager/content/menuSqlHelper.xul"?>
  8. <?xul-overlay href="chrome://sqlitemanager/content/tabDbInfo.xul"?>
  9. <?xul-overlay href="chrome://sqlitemanager/content/exim.xul"?>
  10. <?xul-overlay href="chrome://sqlitemanager/content/udf.xul"?>
  11.  
  12. <!DOCTYPE window SYSTEM "chrome://sqlitemanager/locale/sqlitemanager.dtd">
  13.  
  14. <window id="sqlitemanager-window" title="&window.title;"
  15.  persist="screenX screenY width height sizemode"
  16.  orient="vertical"
  17.  onload="SQLiteManager.Startup()"
  18.  onunload="SQLiteManager.Shutdown()"
  19.  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  20.  xmlns:html="http://www.w3.org/1999/xhtml">
  21.  
  22.   <!-- Icon from chrome -->
  23. <!-- without div, there is error -->
  24.   <html:div>
  25.     <html:link rel="icon" href="chrome://sqlitemanager/skin/images/default16.png"/>
  26.   </html:div>
  27.  
  28.   <script type="application/x-javascript" src="globals.js"/>
  29.   <script type="application/x-javascript" src="tokenize.js"/>
  30.   <script type="application/x-javascript" src="treeDataTable.js"/>
  31.   <script type="application/x-javascript" src="treeDbStructure.js"/>
  32.   <script type="application/x-javascript" src="exim.js"/>
  33.   <script type="application/x-javascript" src="udf.js"/>
  34.   <script type="application/x-javascript" src="createManager.js"/>
  35.   <script type="application/x-javascript" src="sqlitemanager.js"/>
  36.   <script type="application/x-javascript" src="extManager.js"/>
  37.  
  38.   <commandset id="sm-cmdset">
  39.     <command id="smc-newDb" oncommand="SQLiteManager.newDatabase()" tooltiptext="&menu.db.new;"/>
  40.     <command id="smc-openDb" oncommand="SQLiteManager.openDatabase()" tooltiptext="&menu.db.connect;"/>
  41.     <command id="smc-import" oncommand="SQLiteManager.importFromFile()" tooltiptext="&import;" observes="bc-dbOpen"/>
  42.     <command id="smc-udf" oncommand="SQLiteManager.openUdfTab()" tooltiptext="User-defined functions"/>
  43.  
  44.     <!-- commands for tables -->
  45.     <command id="smc-createTable" oncommand="SQLiteManager.createTable()" tooltiptext="&createTable;" observes="bc-dbOpen"/>
  46.     <command id="smc-dropTable" oncommand="SQLiteManager.operateOnTable('drop')" tooltiptext="&dropTable;" observes="bc-dbOpen"/>
  47.     <command id="smc-modifyTable" hidden="true" oncommand="SQLiteManager.operateOnTable('modify')" tooltiptext="&modifyTable;" observes="bc-dbOpen"/>
  48.     <command id="smc-emptyTable" oncommand="SQLiteManager.operateOnTable('empty')" tooltiptext="&emptyTable;" observes="bc-dbOpen"/>
  49.     <command id="smc-renameTable" oncommand="SQLiteManager.operateOnTable('rename')" tooltiptext="&renameTable;" observes="bc-dbOpen"/>
  50.     <command id="smc-copyTable" oncommand="SQLiteManager.operateOnTable('copy')" tooltiptext="©Table;" observes="bc-dbOpen"/>
  51.     <command id="smc-exportTable" oncommand="SQLiteManager.exportObject('table')" tooltiptext="&exportTable;" observes="bc-dbOpen"/>
  52.     <command id="smc-reindexTable" oncommand="SQLiteManager.operateOnTable('reindex')" tooltiptext="&reindexTable;" observes="bc-dbOpen"/>
  53.  
  54.     <!-- commands for views -->
  55.     <command id="smc-createView" oncommand="SQLiteManager.createObject('view')" tooltiptext="&createView;" observes="bc-dbOpen"/>
  56.     <command id="smc-dropView" oncommand="SQLiteManager.dropObject('view')" tooltiptext="&dropView;" observes="bc-dbOpen"/>
  57.     <command id="smc-renameView" oncommand="SQLiteManager.renameObject('view')" tooltiptext="&renameView;" observes="bc-dbOpen"/>
  58.     <command id="smc-modifyView" oncommand="SQLiteManager.modifyView()"  tooltiptext="&modifyView;" observes="bc-dbOpen"/>
  59.     <command id="smc-exportView" oncommand="SQLiteManager.exportObject('view')" tooltiptext="&exportView;" observes="bc-dbOpen"/>
  60.  
  61.     <!-- commands for indexes -->
  62.     <command id="smc-createIndex" oncommand="SQLiteManager.createObject('index')" tooltiptext="&createIndex;" observes="bc-dbOpen"/>
  63.     <command id="smc-dropIndex" oncommand="SQLiteManager.dropObject('index')" tooltiptext="&dropIndex;" observes="bc-dbOpen"/>
  64.     <command id="smc-reindexIndex" oncommand="SQLiteManager.reindexIndex()" tooltiptext="&reindexIndex;" observes="bc-dbOpen"/>
  65.  
  66.     <!-- commands for triggers -->
  67.     <command id="smc-createTrigger" oncommand="SQLiteManager.createObject('trigger')" tooltiptext="&createTrigger;" observes="bc-dbOpen"/>
  68.     <command id="smc-dropTrigger" oncommand="SQLiteManager.dropObject('trigger')" tooltiptext="&dropTrigger;" observes="bc-dbOpen"/>
  69.     <command id="smc-renameTrigger" oncommand="SQLiteManager.renameObject('trigger')" tooltiptext="&renameTrigger;" observes="bc-dbOpen"/>
  70.  
  71.     <!-- commands for search -->
  72.     <command id="smc-search" oncommand="SQLiteManager.search()" tooltiptext="&btn.search;" label="&btn.search;" accesskey="&btn.search.ak;" observes="bc-dbOpen"/>
  73.     <command id="smc-showAll" oncommand="SQLiteManager.showAll()" tooltiptext="&btn.showAll;" label="&btn.showAll;" accesskey="&btn.showAll.ak;" observes="bc-dbOpen"/>
  74.  
  75.     <command id="smc-refresh" oncommand="SQLiteManager.refresh()" tooltiptext="&refreshDirection;" observes="bc-dbOpen"/>
  76.     <command id="smc-options" oncommand="SQLiteManager.openOptionsWindow()" tooltiptext="&mi.options;" accesskey="&mi.options.ak;"/>
  77.     <command id="smc-dominspector" oncommand="SQLiteManager.openDomIWindow()" tooltiptext="Start DOM Inpector"/>
  78.     <command id="smc-aboutconfig" oncommand="SQLiteManager.openAboutConfigWindow()" tooltiptext="&mi.aboutconfig;" accesskey="&mi.aboutconfig.ak;"/>
  79.     <command id="smc-console" oncommand="SQLiteManager.openConsoleWindow()" tooltiptext="&mi.console;" accesskey="&mi.console.ak;"/>
  80.     <command id="smc-selectAllRecords" oncommand="SQLiteManager.selectAllRecords()" tooltiptext="&selectAllRecords;" label="&selectAllRecords;" accesskey="&selectAllRecords.ak;" observes="bc-dbOpen"/>
  81.  
  82.     <!-- for commands under execute tab-->
  83.     <command id="smc-runQuery" oncommand="SQLiteManager.runSqlStatement('select')" />
  84.   </commandset>
  85.  
  86.   <keyset id="smKeyset">
  87.     <key id="refresh-key" modifiers="shift" keycode="VK_F5" command="smc-refresh"/>
  88.     <key id="key-selectAllRecords" modifiers="accel shift" key="A" command="smc-selectAllRecords"/>
  89.     <key id="key-runQuery" modifiers="accel" key=";" command="smc-runQuery"/>
  90.     <key modifiers="control" keycode="VK_F12" command="smc-runQuery"/>
  91.   </keyset>
  92.  
  93.   <!-- hidden because it occupies some space in Songbird -->
  94.   <broadcasterset hidden="true">
  95.     <broadcast id="bc-dbOpen" disabled="true"/>
  96.   </broadcasterset>
  97.  
  98.   <popupset>
  99.     <menupopup id="mp-opTableColumn">
  100.       <menuitem label="&menu.editColumn;" accesskey="&menu.editColumn.ak;" oncommand="SQLiteManager.startEditColumn()"/>
  101.       <menuitem label="&menu.dropColumn;" accesskey="&menu.dropColumn.ak;" oncommand="SQLiteManager.dropColumn()"/>
  102.     </menupopup>
  103.  
  104.     <!-- context menu for tree columns in treeDataTable -->
  105.     <menupopup id="mp-data-treecol">
  106.       <menuitem label="&menu.copyColName;" accesskey="&menu.copyColName.ak;" oncommand="SQLiteManager.copyColumnName(this)"/>
  107.     </menupopup>
  108.  
  109.     <!-- context menu for tree in execute tab -->
  110.     <menupopup id="mp-copy">
  111.       <menuitem label="&menu.copyRows;" accesskey="&menu.copyRows.ak;" oncommand="treeExecute.UserCopyRows('csv')"/>
  112.       <menuitem label="&menu.copyRowsForExcel;" oncommand="treeExecute.UserCopyRows('csv-excel')"/>
  113.       <menuitem label="&menu.copyRowsAsSql;" accesskey="&menu.copyRowsAsSql.ak;" oncommand="treeExecute.UserCopyRows('sql')"/>
  114.       <menuseparator/>
  115.       <menuitem label="&menu.copyCell;" accesskey="&menu.copyCell.ak;" oncommand="treeExecute.UserCopyCell()"/>
  116.     </menupopup>
  117.  
  118.     <!-- context menu for tree in browse tab for master tables & views -->
  119.     <menupopup id="mp-browse-copy">
  120.       <menuitem label="&menu.copyRows;" accesskey="&menu.copyRows.ak;" oncommand="treeBrowse.UserCopyRows('csv')"/>
  121.       <menuitem label="&menu.copyRowsForExcel;" oncommand="treeBrowse.UserCopyRows('csv-excel')"/>
  122.       <menuitem label="&menu.copyRowsAsSql;" accesskey="&menu.copyRowsAsSql.ak;" oncommand="treeBrowse.UserCopyRows('sql')"/>
  123.       <menuseparator/>
  124.       <menuitem label="&menu.copyCell;" accesskey="&menu.copyCell.ak;" oncommand="treeBrowse.UserCopyCell()"/>
  125.     </menupopup>
  126.   
  127.     <!-- context menu for tree in browse tab for other tables -->
  128.     <menupopup id="mp-editTableRow">
  129.       <menuitem label="&menu.editSelected;" accesskey="&menu.editSelected.ak;" oncommand="SQLiteManager.operateOnTable('update')"/>
  130.       <menuitem label="&menu.deleteSelected;" accesskey="&menu.deleteSelected.ak;" oncommand="SQLiteManager.operateOnTable('delete')"/>
  131.       <menuitem label="&menu.duplicateRecord;" accesskey="&menu.duplicateRecord.ak;" oncommand="SQLiteManager.operateOnTable('duplicate')"/>
  132.       <menuseparator/>
  133.       <menuitem label="&menu.copyRows;" accesskey="&menu.copyRows.ak;" oncommand="treeBrowse.UserCopyRows('csv')"/>
  134.       <menuitem label="&menu.copyRowsForExcel;" oncommand="treeBrowse.UserCopyRows('csv-excel')"/>
  135.       <menuitem label="&menu.copyRowsAsSql;" accesskey="&menu.copyRowsAsSql.ak;" oncommand="treeBrowse.UserCopyRows('sql')"/>
  136.       <menuseparator/>
  137.       <menuitem label="&menu.copyCell;" accesskey="&menu.copyCell.ak;" oncommand="treeBrowse.UserCopyCell()"/>    </menupopup>
  138.  
  139.     <menupopup id="mp-create-table">
  140.       <menuitem label="&createTable;" accesskey="&create.ak;" command="smc-createTable"/>
  141.     </menupopup>
  142.     <menupopup id="mp-create-index">
  143.       <menuitem label="&createIndex;" accesskey="&create.ak;" command="smc-createIndex"/>
  144.     </menupopup>
  145.     <menupopup id="mp-create-view">
  146.       <menuitem label="&createView;" accesskey="&create.ak;" command="smc-createView"/>
  147.     </menupopup>
  148.     <menupopup id="mp-create-trigger">
  149.       <menuitem label="&createTrigger;"  accesskey="&create.ak;" command="smc-createTrigger"/>
  150.     </menupopup>
  151.  
  152.     <menupopup id="mp-dbstructure" onpopupshowing="SQLiteManager.setTreeStructureContextMenu();">
  153.     </menupopup>
  154.  
  155.     <menupopup id="mp-detachDb">
  156.       <menuitem label="&menu.db.detach;" oncommand="SQLiteManager.detachDatabase()"/>
  157.     </menupopup>
  158.   </popupset>
  159.  
  160.   <vbox id="hello" flex="1">
  161.     <toolbox id="tb-main">
  162.       <menubar id="sm-menubar">
  163.         <menu id="menu-database" label="&menu.db;" accesskey="&menu.db.ak;">
  164.           <menupopup>
  165.             <menuitem label="&menu.db.new;" accesskey="&menu.db.new.ak;" command="smc-newDb"/>
  166.             <menuitem label="&menu.db.newMemory;" accesskey="&menu.db.newMemory.ak;" oncommand="SQLiteManager.openMemoryDatabase()"/>
  167.             <menuitem label="&menu.db.connect;" accesskey="&menu.db.connect.ak;" command="smc-openDb"/>
  168.             <menuitem id="mi-connect-ads-win" hidden="true" label="&menu.db.connectADS;" oncommand="SQLiteManager.openDatabaseADS()"/>
  169.             <menuitem label="&menu.db.close;" accesskey="&menu.db.close.ak;" oncommand="SQLiteManager.closeDatabase()" observes="bc-dbOpen"/>  
  170.             <menu label="&menu.db.mru;" id="menu-mru"  accesskey="&menu.db.mru.ak;">
  171.               <menupopup>
  172.               </menupopup>
  173.             </menu>
  174.             <menuseparator/>
  175.             <menuitem label="&menu.db.attach;" accesskey="&menu.db.attach.ak;" oncommand="SQLiteManager.attachDatabase()" observes="bc-dbOpen"/>
  176.             <menuitem label="&menu.db.detach;" accesskey="&menu.db.detach.ak;" oncommand="SQLiteManager.detachDatabase()" observes="bc-dbOpen"/>
  177.             <menuseparator/>
  178.             <menuitem label="&menu.db.copy;" accesskey="&menu.db.copy.ak;" oncommand="SQLiteManager.copyDatabase()" observes="bc-dbOpen"/>  
  179.             <menuitem label="&menu.db.compact;" accesskey="&menu.db.compact.ak;" oncommand="SQLiteManager.compactDatabase()" observes="bc-dbOpen"/>  
  180.             <menuitem label="&menu.db.analyze;" accesskey="&menu.db.analyze.ak;" oncommand="SQLiteManager.analyzeDatabase()" observes="bc-dbOpen"/>  
  181.             <menuitem label="&menu.db.check;" accesskey="&menu.db.check.ak;" oncommand="SQLiteManager.checkIntegrity()" observes="bc-dbOpen"/>  
  182.             <menuseparator/>
  183.             <menuitem label="&exportAll;" accesskey="&exportAll.ak;" oncommand="SQLiteManager.exportAll('tables')" observes="bc-dbOpen"/>  
  184.             <menuitem label="&exportDb;" accesskey="&exportDb.ak;" oncommand="SQLiteManager.exportAll('db')" observes="bc-dbOpen"/>  
  185.             <menuitem label="&exportDbStr;" accesskey="&exportDbStr.ak;" oncommand="SQLiteManager.exportAll('dbstructure')" observes="bc-dbOpen"/>  
  186.             <menuitem label="&import;" accesskey="&import.ak;" command="smc-import"/>  
  187.             <menuseparator/>
  188.             <menuitem  label="&refresh;" accesskey="&refresh.ak;" command="smc-refresh" key="refresh-key"/>  
  189.             <menuitem label="&reconnect;" accesskey="&reconnect.ak;" oncommand="SQLiteManager.reconnect()" observes="bc-dbOpen"/>  
  190. <!--
  191.             <menuitem label="Save Database" accesskey="s" disabled="true"/>  
  192. -->
  193.             <menuseparator/>
  194.             <menuitem label="&exit;" accesskey="&exit.ak;" oncommand="window.close()"/>
  195.           </menupopup>
  196.         </menu>
  197.         <!-- menupopups in the next 4 menus have been reused using javascript createMenu function-->
  198.         <menu id="menu-table" label="&menu.table;" accesskey="&menu.table.ak;">
  199.           <menupopup>
  200.             <menuitem label="&createTable;" accesskey="&create.ak;" command="smc-createTable"/>
  201.             <menuitem label="&dropTable;" accesskey="&drop.ak;" command="smc-dropTable"/>
  202.             <menuitem label="&emptyTable;" accesskey="&empty.ak;" command="smc-emptyTable"/>
  203.             <menuseparator/>
  204.             <menuitem label="&renameTable;" accesskey="&rename.ak;" command="smc-renameTable"/>
  205.             <menuitem label="&modifyTable;" accesskey="&modify.ak;" command="smc-modifyTable"/>
  206.             <menuitem label="©Table;" accesskey="©.ak;" command="smc-copyTable"/>
  207.             <menuitem label="&exportTable;" accesskey="&export.ak;" command="smc-exportTable"/>
  208.             <menuseparator/>
  209.             <menuitem label="&reindexTable;"  accesskey="&reindex.ak;" command="smc-reindexTable"/>
  210.             <!-- some error: says unknown collation -->
  211.             <!--
  212.             <menuitem label="&analyzeTable;" accesskey="&analyze.ak;" oncommand="SQLiteManager.operateOnTable('analyze')"/>
  213.             -->
  214.           </menupopup>
  215.         </menu> 
  216.         <menu id="menu-index" label="&menu.index;" accesskey="&menu.index.ak;"> 
  217.           <menupopup>
  218.             <menuitem label="&createIndex;" accesskey="&create.ak;" command="smc-createIndex"/>
  219.             <menuitem label="&dropIndex;" accesskey="&drop.ak;" command="smc-dropIndex"/>
  220.             <menuseparator/>
  221.             <menuitem label="&reindexIndex;" accesskey="&reindex.ak;" command="smc-reindexIndex"/>
  222.           </menupopup>
  223.         </menu> 
  224.         <menu id="menu-view" label="&menu.view;" accesskey="&menu.view.ak;">
  225.           <menupopup>
  226.             <menuitem label="&createView;" accesskey="&create.ak;" command="smc-createView"/>
  227.             <menuitem label="&dropView;" accesskey="&drop.ak;" command="smc-dropView"/>
  228.             <menuseparator/>
  229.             <menuitem label="&renameView;" accesskey="&rename.ak;" command="smc-renameView"/>
  230.             <menuitem label="&modifyView;" accesskey="&modify.ak;" command="smc-modifyView"/>
  231.             <menuitem label="&exportView;" accesskey="&export.ak;" command="smc-exportView"/>
  232.           </menupopup>
  233.         </menu> 
  234.         <menu id="menu-trigger" label="&menu.trigger;" accesskey="&menu.trigger.ak;">
  235.           <menupopup>
  236.             <menuitem label="&createTrigger;" accesskey="&create.ak;" command="smc-createTrigger"/>
  237.             <menuitem label="&dropTrigger;" accesskey="&drop.ak;" command="smc-dropTrigger"/>
  238.             <menuseparator/>
  239.             <menuitem label="&renameTrigger;" accesskey="&rename.ak;" command="smc-renameTrigger"/>
  240.           </menupopup>
  241.         </menu> 
  242.         <menu id="menu-tools" label="&menu.tools;" accesskey="&menu.tools.ak;">
  243.           <menupopup id="sm_menu_tools_popup">
  244.           <menuitem label="&mi.options;" accesskey="&mi.options.ak;" command="smc-options"/>
  245.           <!-- Issue #149: default state of the following menuitem should be unchecked -->
  246.           <menuitem id="menu-general-sharedPagerCache" label="&mi.sharedPagerCache;"  accesskey="&mi.sharedPagerCache.ak;" type="checkbox"/>
  247.           <menuitem id="menu-general-extensionTable" type="checkbox" label="&mi.extensionTable;" accesskey="&mi.extensionTable.ak;" oncommand="SQLiteManager.useExtensionManagementTable(this.hasAttribute('checked'),false);" observes="bc-dbOpen"/>
  248.  
  249.             <menuitem id="experiment" label="Experiment" oncommand="SQLiteManager.experiment()"/>
  250.           </menupopup>
  251.         </menu>
  252.         <menu id="menu-help" label="&menu.help;">
  253.           <menupopup>
  254.             <menuitem label="&menu.help.reportProblem;" accesskey="&menu.help.reportProblem.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.issueNew)"/>
  255.             <menuitem label="&menu.help.faq;" accesskey="&menu.help.faq.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.faq)"/>
  256.             <menuseparator/>
  257.             <menuitem label="&menu.help.sqlitehome;" accesskey="&menu.help.sqlitehome.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.sqliteHome)"/>
  258.             <menuitem label="&menu.help.sqlitesyntax;" accesskey="&menu.help.sqlitesyntax.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.sqliteLang)"/>
  259.             <menuseparator/>
  260.             <menuitem label="&menu.help.extensionhome;" accesskey="&menu.help.extensionhome.ak;" oncommand="SmGlobals.openURL(SmGlobals.webpages.home)"/>
  261.             <menuitem label="&menu.help.aboutextension;" accesskey="&menu.help.aboutextension.ak;" oncommand="window.openDialog(SmGlobals.chromes.aboutSM,'about','chrome, centerscreen, modal, dialog');"/>
  262.           </menupopup>
  263.         </menu>
  264.         <spacer flex="1"/>
  265.        </menubar>
  266.       <!-- this hbox holds all main toolbars. --> 
  267.       <hbox id="hbox-main-toolbar">
  268.       <!-- each toolbar must end with a toolbarseparator to allow dynamic  arrangement of toolbars without spoiling the display-->
  269.       <toolbar id="sm-toolbar-refresh">
  270.         <toolbarbutton id="tbb_refresh" command="smc-refresh"/>
  271.         <toolbarbutton id="tbb_options" command="smc-options"/>
  272.         <toolbarseparator/>
  273.       </toolbar>
  274.  
  275.       <toolbar id="sm-toolbar-database">
  276.         <toolbarbutton id="tbb_newDb" command="smc-newDb"/>
  277.         <toolbarbutton id="tbb_openDb" command="smc-openDb"/>
  278.         <toolbarbutton id="tbb_import" command="smc-import"/>
  279.         <toolbarbutton id="tbb_udf" command="smc-udf"/>
  280.         <toolbarseparator/>
  281.       </toolbar>
  282.  
  283.       <toolbar id="sm-toolbar-table">
  284.         <toolbarbutton id="tbb_createTable" command="smc-createTable"/>
  285.         <toolbarbutton id="tbb_dropTable" command="smc-dropTable"/>
  286.         <toolbarbutton id="tbb_modifyTable" command="smc-modifyTable"/>
  287.         <toolbarseparator/>
  288.       </toolbar>
  289.       <toolbar id="sm-toolbar-index">
  290.         <toolbarbutton id="tbb_createIndex" command="smc-createIndex"/>
  291.         <toolbarbutton id="tbb_dropIndex" command="smc-dropIndex"/>
  292.         <toolbarseparator/>
  293.       </toolbar>
  294.  
  295.       <toolbar id="sm-toolbar-profileDB">
  296.         <menu id="menu-DbList" label="&dir;" tooltiptext="&dir;">
  297.           <menupopup>
  298.           <menuitem label="&profileDir;" type="radio" name="menu-defaultDir" checked="true" oncommand="SQLiteManager.populateDBList('profile');"/>
  299.           <menuitem label="&userDir;" type="radio" name="menu-defaultDir" oncommand="SQLiteManager.populateDBList('user');"/>
  300.           <menuseparator/>
  301.           <menuitem label="&selectUserDir;" oncommand="SQLiteManager.selectDefaultDir();"/>
  302.           </menupopup>
  303.         </menu>
  304.         <menulist id="listbox-profileDB" style="max-width: 25ex" sizetopopup="always" dirType="profile">
  305.           <menupopup>
  306.             <menuitem label="&profile.dblist.select;" selected="true"/>
  307.           </menupopup>
  308.         </menulist>
  309.         <toolbarbutton label="&profile.dblist.buttonlabel;" tooltiptext="&profile.dblist.buttonlabel;" oncommand="SQLiteManager.openSelectedDatabase('listbox-profileDB')" />
  310.         <toolbarseparator/>
  311.       </toolbar>
  312.  
  313.       <toolbar id="sm-toolbar-debug" hidden="true">
  314.         <toolbarbutton id="tbb_aboutConfig" command="smc-aboutconfig"/>
  315.         <toolbarbutton id="tbb_console" command="smc-console"/>
  316.         <toolbarbutton id="tbb_dominspector" command="smc-dominspector" hidden="true"/>
  317.         <toolbarseparator/>
  318.       </toolbar>
  319.  
  320.       <!-- required to let the toolbar occupy the whole width flex=1 is necessary. -->
  321.       <toolbar id="sm-toolbar-spacer" flex="1"/>
  322.       </hbox>
  323.     </toolbox>
  324.  
  325.   <hbox flex="1">
  326.     <vbox id="sidebar-left" flex="1" persist="width">
  327.       <menulist id="ml-dbNames" style="font-weight: bold;  color: blue; padding: 3px 3px;" context="mp-detachDb" oncommand="SQLiteManager.changeAttachedDb();"/>
  328.       <tree id="t-dbStructNorm" flex="1" hidecolumnpicker="true" seltype="single" selstyle="primary" onselect="SQLiteManager.getDbObjectInfo()">
  329.         <treecols>
  330.           <!-- primary=true required to put +/- sign for hierarchical tree -->
  331.           <treecol id="col-dbStructNorm" hideheader="true" primary="true" flex="1"/>
  332.         </treecols>
  333.           <treechildren id="tc-dbStructNorm" context="mp-dbstructure"/>  
  334.       </tree>
  335.     </vbox>
  336.  
  337.     <splitter id="localsplitter" persist="state" collapse="before">
  338.       <grippy/>
  339.     </splitter>
  340.  
  341.     <vbox flex="1" persist="width">
  342.     <tabbox id="sm-tabbox" flex="1">
  343.       <tabs id="sm-tabs" onselect="SQLiteManager.loadTabWithId(this.selectedItem.id)" closebutton="false" onclosetab="SQLiteManager.closeTab()">
  344.         <tab id="tab-structure" linkedpanel="structureTab" label="&tab.structure;"  persist="selected"/>
  345.         <tab id="tab-browse" linkedpanel="browseTab" label="&tab.browse;" persist="selected"/>
  346.         <tab id="tab-execute" linkedpanel="executeTab" label="&tab.execute;"  persist="selected"/>
  347.         <tab id="tab-dbinfo" linkedpanel="dbInfoTab" label="&tab.dbinfo;" persist="selected"/>
  348.         <tab id="tab-exim" linkedpanel="eximTabpanel" collapsed="true"/>
  349.         <tab id="tab-udf" linkedpanel="udfTabpanel" label="&tab.udf;" collapsed="true"/>
  350.       </tabs>
  351.  
  352.       <tabpanels id="sm-tabpanels" flex="1">
  353.         <tabpanel id="structureTab" flex="1">
  354.         <vbox id="vb-structureTab" flex="1">
  355.           <groupbox>
  356.           <caption id="cap-object-info"/>
  357.           <deck id="d-master-ops" hidden="true">
  358.           <hbox id="gb-master-ops-master">
  359.             <button label="&export;" command="smc-exportTable"/>
  360.           </hbox>
  361.           <hbox id="gb-master-ops-table">
  362.             <button label="&drop;" command="smc-dropTable"/>
  363.             <button label="∅" command="smc-emptyTable"/>
  364.             <button label="&rename;" command="smc-renameTable"/>
  365.             <button label="&reindex;" command="smc-reindexTable"/>
  366.             <button label="©" command="smc-copyTable"/>
  367.             <button label="&export;" command="smc-exportTable"/>
  368.             <button label="FK" id="btn-foreign-key" oncommand="SQLiteManager.generateFKTriggers()"/>
  369.           </hbox>
  370.           <hbox id="gb-master-ops-view">
  371.             <button label="&drop;" command="smc-dropView"/>
  372.             <button label="&rename;" command="smc-renameView"/>
  373.             <button label="&modify;" command="smc-modifyView"/>
  374.             <button label="&export;" command="smc-exportView"/>
  375.           </hbox>
  376.           <hbox id="gb-master-ops-index">
  377.             <button label="&drop;" command="smc-dropIndex"/>
  378.             <button label="&reindex;" command="smc-reindexIndex"/>
  379.           </hbox>
  380.           <hbox id="gb-master-ops-trigger">
  381.             <button label="&drop;" command="smc-dropTrigger"/>
  382.             <button label="&rename;" command="smc-renameTrigger"/>
  383.           </hbox>
  384.           </deck>
  385.           </groupbox>
  386.           <vbox flex="1" style="overflow:auto">
  387.           <groupbox id="gb-master-info" hidden="true">
  388.           <caption label="&masterinfo.sql;"/>
  389.           <description id="desc-sql" style="white-space: pre-wrap;"  tooltiptext="Double-click to copy the SQL statement" ondblclick="SQLiteManager.copyText(this.textContent);" hidden="true"/>
  390.           <textbox id="str-sql" multiline="true" rows="1" align="stretch" style="overflow: auto" readonly="true"/>
  391.           </groupbox>
  392.           <deck id="d-more-info" hidden="true">
  393.           <vbox id="gb-more-info-table" flex="1">
  394.           <groupbox>
  395.           <caption label="&moreInfo;"/>
  396.  
  397.           <hbox>
  398.             <label class="forControl" value="&numRecords;:"/>
  399.             <textbox id="numRecords" style="width: 8ex" readonly="true"/>
  400.             <label class="forControl" value="&numIndexes;:"/>
  401.             <textbox id="numIndexes" style="width: 8ex" readonly="true"/>
  402.             <label class="forControl" value="&numTriggers;:"/>
  403.             <textbox id="numTriggers" style="width: 8ex" readonly="true"/>
  404.           </hbox>
  405.           </groupbox>
  406.           <groupbox id="gb-editColumn" hidden="true">
  407.           <caption label="&menu.editColumn;"/>
  408.             <grid>
  409.               <columns>
  410.                 <column style="padding: 1px 5px; width: 100px;"/>
  411.                 <column style="padding: 1px 5px; width: 200px;"/>
  412.                 <column style="padding: 1px 5px; width: 200px;"/>
  413.                 <column style="padding: 1px 5px; width: 200px;"/>
  414.               </columns>
  415.               <rows>
  416.                 <row align="center">
  417.                   <text value=""/>
  418.                   <text value="Column Name"/>
  419.                   <text value="Column Type"/>
  420.                   <text value="Default Value"/>
  421.                 </row>
  422.                 <row align="center">
  423.                   <text value="Old values"/>
  424.                   <textbox id="tb-ec-oldName" readonly="true"/>
  425.                   <textbox id="tb-ec-oldType" readonly="true"/>
  426.                   <textbox id="tb-ec-oldDefault" readonly="true"/>
  427.                 </row>
  428.                 <row align="center">
  429.                   <text value="New values"/>
  430.                   <textbox id="tb-ec-newName"/>
  431.                   <textbox id="tb-ec-newType"/>
  432.                   <textbox id="tb-ec-newDefault"/>
  433.                 </row>
  434.                 <row align="center">
  435.                   <text value=""/>
  436.                   <text value=""/>
  437.                   <hbox>
  438.                   <text id="tb-ec-table" hidden="true"/>
  439.                   <button label="Cancel" oncommand="SQLiteManager.cancelEditColumn()"/>
  440.                   <button label="Change" oncommand="SQLiteManager.alterColumn()"/>
  441.                   </hbox>
  442.                   <text value=""/>
  443.                 </row>
  444.               </rows>
  445.             </grid>
  446.           </groupbox>
  447.           <groupbox>
  448.           <caption id="capColumns" labelPrefix="&Columns;"/>
  449.   <tree id="treeTabCols" rows="6" seltype="single" smTableName="" onselect="">
  450.       <treecols>
  451.         <treecol id="cCid" label="Column ID" flex="1" persist="width"/>
  452.         <splitter class="tree-splitter"/>
  453.         <treecol id="cName" label="Name" flex="1" persist="width"/>
  454.         <splitter class="tree-splitter"/>
  455.         <treecol id="cType" label="Type" flex="1" persist="width"/>
  456.         <splitter class="tree-splitter"/>
  457.         <treecol id="cNotnull" label="Not Null" flex="1" persist="width"/>
  458.         <splitter class="tree-splitter"/>
  459.         <treecol id="cDflt_value" label="Default Value" flex="1" persist="width"/>
  460.         <splitter class="tree-splitter"/>
  461.         <treecol id="cPk" label="Primary Key" flex="1" persist="width"/>
  462.       </treecols>
  463.           <treechildren id="smTableColumns" context="mp-opTableColumn">
  464.           </treechildren>
  465.   </tree>
  466.           <vbox id="hb-addcol">
  467.           <hbox>
  468.             <label style="width:24ex;" value="&name;"/>
  469.             <label style="width:15ex;" value="&type;"/>
  470.             <label style="width:6ex;" value="¬Null;"/>
  471.             <label style="width:10ex;" value="&default;"/>
  472.           </hbox>
  473.           <hbox>
  474.           <textbox id="tb-addcol-name" style="width:24ex"/>
  475.           <menulist id="tb-addcol-type" style="width:15ex" editable="true"  sizetopopup="none">
  476.             <menupopup>
  477.               <menuitem label="" selected="true"/>
  478.               <menuitem label="INTEGER" />
  479.               <menuitem label="BOOL" />
  480.               <menuitem label="REAL" />
  481.               <menuitem label="DOUBLE" />
  482.               <menuitem label="FLOAT" />
  483.               <menuitem label="CHAR" />
  484.               <menuitem label="TEXT" />
  485.               <menuitem label="VARCHAR" />
  486.               <menuitem label="BLOB" />
  487.               <menuitem label="NUMERIC" />
  488.               <menuitem label="DATETIME" />
  489.             </menupopup>
  490.           </menulist>
  491.         <checkbox id="tb-addcol-notnull" style="width:7ex"  value=""/>
  492.           <textbox id="tb-addcol-default" style="width:10ex"/>
  493.           <button id="btn-addcol" label="&btn.addcol;" oncommand="SQLiteManager.operateOnTable('addColumn')"/>
  494.           </hbox>
  495.           </vbox>
  496.           </groupbox>
  497.           </vbox>
  498.           <groupbox id="gb-more-info-view"/>
  499.           <vbox id="gb-more-info-index">
  500.             <groupbox>
  501.             <caption label="&indexProp;"/>
  502.           
  503.             <hbox>
  504.               <label class="forControl" value="&indexedTable;:"/>
  505.               <textbox id="tabletoindex" style="width: 25ex" readonly="true"/>
  506.               <label class="forControl" value="&indexDuplicate;:"/>
  507.               <textbox id="duplicatevalues" style="width: 25ex" readonly="true"/>
  508.             </hbox>
  509.             </groupbox>
  510.           <groupbox>
  511.           <caption label="&indexedFields;"/>
  512.   <tree id="treeIdxCols" rows="4" seltype="single">
  513.       <treecols>
  514.         <treecol id="ciSeqno" label="Seq. No." flex="1" persist="width"/>
  515.         <splitter class="tree-splitter"/>
  516.         <treecol id="ciCid" label="Column ID" flex="1" persist="width"/>
  517.         <splitter class="tree-splitter"/>
  518.         <treecol id="ciName" label="Name" flex="1" persist="width"/>
  519.       </treecols>
  520.           <treechildren id="smIndexColumns">
  521.           </treechildren>
  522.   </tree>
  523.             </groupbox>
  524.           </vbox>
  525.           <groupbox id="gb-more-info-trigger"/>
  526.           </deck>
  527.           </vbox>
  528.           </vbox>
  529.         </tabpanel>
  530.         <tabpanel id="browseTab" flex="1">
  531.           <vbox id="vb-browseTab" flex="1">
  532.             <hbox align="center" id="optionbar" style="min-height: 1.4em">
  533.               <label id="browse-type" accesskey="" value="" persist="value"/>
  534.               <textbox id="browse-name" value="" persist="value" readonly="true" width="80"/>
  535.               <button id="btnSearch" command="smc-search"/>
  536.               <button id="btnShowAll"  command="smc-showAll"/>
  537.               <spacer flex="1"/>
  538.               <button id="btnAddRecord" label="&btn.addrecord;" tooltiptext="&btn.addrecord;" accesskey="&btn.addrecord.ak;" oncommand="SQLiteManager.operateOnTable('insert')"/>
  539.               <button id="btnAddDupRecord" label="&menu.duplicateRecord;" tooltiptext="&menu.duplicateRecord;" accesskey="&menu.duplicateRecord.ak;" oncommand="SQLiteManager.operateOnTable('duplicate')"/>
  540.               <button id="btnEditRecord" label="&menu.editSelected;" tooltiptext="&menu.editSelected;" accesskey="&menu.editSelected.ak;" oncommand="SQLiteManager.operateOnTable('update')" />
  541.               <button id="btnDeleteRecord" label="&menu.deleteSelected;" tooltiptext="&menu.deleteSelected;"  accesskey="&menu.deleteSelected.ak;" oncommand="SQLiteManager.operateOnTable('delete')" />
  542.             </hbox>
  543. <!-- trial for sliding forms -->
  544.             <vbox flex="1">
  545.             <vbox id="box-rowedit" flex="1" hidden="true" style="overflow: auto"/>
  546.             <tree id="browse-tree" style="min-height:20em" editable="true"  flex="1" seltype="multiple" enableColumnDrag="false">
  547.               <treecols hidden="true"/>
  548.               <treechildren id="browse-treechildren" editable="true" hidden="true" flex="1" context="mp-editTableRow" onclick="treeBrowse.UserTreeClick(event)"/>
  549.             </tree>
  550.             </vbox>
  551.             <hbox id="browse-navigate">
  552.               <button id="btn-nav-first" label="<<" tooltiptext="&first;" oncommand="SQLiteManager.onBrowseNavigate('first')"/>
  553.               <button id="btn-nav-previous" label="<" tooltiptext="&previous;" oncommand="SQLiteManager.onBrowseNavigate('previous')"/>
  554.               <label id="nav-start-val" style="padding-top:5px;font-weight:bold;"/>
  555. <!--
  556.               <textbox id="nav-start-val" style="width:50px"/>
  557. -->
  558.               <label value="&to;" style="padding-top:5px"/>
  559.               <label id="nav-end-val" style="padding-top:5px;font-weight:bold;"/>
  560. <!--
  561.               <textbox id="nav-end-val" style="width:50px"/>
  562. -->
  563.               <label value="&of;" style="padding-top:5px"/>
  564.               <label id="nav-total-val" style="padding-top:5px;font-weight:bold;"/>
  565. <!--
  566.               <textbox id="nav-total-val" readonly="true" style="width:50px"/>
  567. -->
  568.               <button id="btn-nav-next" label=">" tooltiptext="&next;" oncommand="SQLiteManager.onBrowseNavigate('next')"/>
  569.               <button id="btn-nav-last" label=">>" tooltiptext="&last;" oncommand="SQLiteManager.onBrowseNavigate('last')"/>
  570.             </hbox>
  571.           </vbox>
  572.         </tabpanel>
  573.  
  574.         <tabpanel id="executeTab" flex="1">
  575.           <vbox id="vb-executeTab" flex="1">
  576.             <hbox>
  577.             <label style="font-size:10pt;" value="&string.enterSql;" accesskey="&string.enterSql.ak;" control="txtSqlStatement"/>
  578.             <hbox id="hb-queryHistory">
  579.              <image id="queryHistoryPrevImage" hidden="true" tooltiptext="&btn.prevSql;" onclick="SQLiteManager.showPrevSql()"/>
  580.             <image id="queryHistoryNextImage" hidden="true" tooltiptext="&btn.nextSql;" onclick="SQLiteManager.showNextSql()"/>
  581.             <image id="querySaveByNameImage" hidden="true" tooltiptext="&btn.saveQuery;" onclick="SQLiteManager.saveSqlByName()"/>
  582.             <image id="queryHistoryClearImage" hidden="true" tooltiptext="&btn.clearHistory;" onclick="SQLiteManager.clearSqlHistory()"/>
  583.             </hbox>
  584.   
  585.             <spacer flex="1"/>
  586.             <toolbox id="tb-sql-helper">
  587.               <!-- comes from menuSqlHelper.xul overlay -->
  588.               <menubar id="sql-help-menubar"/>
  589.             </toolbox>
  590.             </hbox>
  591.   
  592.             <vbox style="min-height:5em">
  593.             <textbox id="txtSqlStatement" multiline="true" rows="2" flex="1" value="SELECT * FROM tablename" />
  594.  
  595.             <hbox flex="0">
  596.             <menulist id="listbox-queries" hidden="true" style="max-width: 25ex" sizetopopup="always" oncommand="SQLiteManager.onSelectQuery();">
  597.               <menupopup/>
  598.             </menulist>
  599.             <button id="buttonRun" command="smc-runQuery" label="&btn.runsql;" accesskey="&btn.runsql.ak;" tooltiptext="&btn.runsql.tooltiptext;"/>
  600.   <!--
  601.             <button id="buttonRun" label="&buttonRun;" accesskey="&buttonRun.ak;" oncommand="SQLiteManager.runSqlStatement('select')" />
  602.             <button id="buttonExecute" label="&buttonExecute;" accesskey="&buttonExecute.ak;" oncommand="SQLiteManager.runSqlStatement('execute')" />
  603.   -->
  604.             <label class="forControl" value="&label.sqlLastError;:"/>
  605.             <textbox id="sqlLastError" readonly="true" flex="1"/>
  606.             </hbox>
  607.             </vbox>
  608.             <splitter id="executetabsplitter" persist="state" collapse="before"/>
  609.  
  610.             <hbox flex="1">
  611.               <tree align="stretch" id="treeSqlOutput" style="min-height:10em" enableColumnDrag="true" seltype="multiple" flex="1">
  612.                 <treecols hidden="true"/>
  613.                 <treechildren hidden="true" flex="1" onclick="treeExecute.UserTreeClick(event)" context="mp-copy"/>  
  614.               </tree>
  615.             </hbox>
  616.           </vbox>
  617.         </tabpanel>
  618.  
  619.         <tabpanel id="dbInfoTab"/>
  620.         <tabpanel id="eximTabpanel"/>
  621.         <tabpanel id="udfTabpanel"/>
  622.       </tabpanels>
  623.     </tabbox>
  624.     </vbox>
  625.     </hbox>
  626.     </vbox>
  627.  
  628.     <statusbar id="sbFull">
  629.       <statusbarpanel id="sbSqliteVersion" style="font-weight:bold"/>
  630.       <statusbarpanel id="sbGeckoVersion"/>
  631.       <statusbarpanel id="sbExtVersion" style="color:#666666"/>
  632.       <statusbarpanel id="sbSharedMode" label="---" style="font-weight:bold;"/>
  633.       <statusbarpanel id="sbPanel-display" flex="1"/>
  634.       <statusbarpanel id="sbQueryTime"/>
  635.     </statusbar>  
  636.  
  637. <!-- for cloning; hidden=true otherwise awkward space at the bottom-->
  638. <menuitem id="mi-mru" crop="center" oncommand="SQLiteManager.openDatabaseWithPath(this.label)" hidden="true"/>
  639. </window>
  640.